dispatchKeyEvent
open fun dispatchKeyEvent(@NonNull component: @NonNull KeyEventDispatcher.Component, @Nullable root: @Nullable View, callback: @Nullable Window.Callback, @NonNull event: @NonNull KeyEvent): Boolean(source)
Call this when dispatching a key event. This is usually called in lieu of the Window.Callback dispatchKeyEvent implementation (eg. instead of calling super.dispatchKeyEvent in an Activity).
Return
true
if the event was consumed, false
otherwise
Parameters
component
the component implementation
root
the root of the view hierarchy that this event will be dispatched to
callback
a Window.Callback implementation or null
if there isn't one
event
the event to dispatch